<?php
class ViewAdminController {

	private $full;
	function __construct($full = true) {
		$this->full = $full;
	}
	function __destruct() {
	}
	public function setFull($type) {
		$this->full = $type;
	}
	public function render($func, $data = null, array $metadata = array()) {
		$metadata['title'] = 'Gestión de: ' . $metadata['title'];
		$metadata['background'] = "adminfondo.jpg";
		$metadata['background_color'] = "#240000";
		$metadata['background_footer_color'] = "#240000";
		$metadata['background_footer'] = "lilafooter.jpg";

		foreach ($metadata as $key => $value) {
			$$key = $value;
		}
		if($this->full) {
			require '../inc/headerlogin.php';
		}

		require '../views/admin/' . $func . '.php';

		if($this->full) {
			require '../inc/footer.php';
		}
	}

}

